<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class GetCourse extends CI_Controller{

	public function index($id){
		$student = $this->student_model->get_student($id);
        $data = file_get_contents("http://114.215.88.72/newmysise1/wechat/course/".$student[0]['sid']."/".$student[0]['password']);
        $data = json_decode($data,TRUE);
		$this->load->view('table',array('course_info'=>$data['course']));
	}

	public function scorehtml($id){
		$student = $this->student_model->get_student($id);
		$data = file_get_contents("http://114.215.88.72/newmysise1/wechat/score/".$student[0]['sid']."/".$student[0]['password']);
        $data = json_decode($data,TRUE);
        $this->load->view('score',array('score'=>$data['score']));
	}
}